﻿using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace NTmdb.TestProject
{
    /// <summary>
    ///     This is a test class for TmdbExceptionTest and is intended
    ///     to contain all TmdbExceptionTest Unit Tests
    /// </summary>
    [TestClass]
    public class TmdbExceptionTest
    {
        /// <summary>
        ///     A test for TmdbException Constructor
        /// </summary>
        [TestMethod]
        public void TmdbExceptionConstructorTest()
        {
            Exception innerException = new ArgumentOutOfRangeException();
            var target = new TmdbException( innerException );
            Assert.AreSame( innerException, target.InnerException );
        }

        /// <summary>
        ///     A test for TmdbException Constructor
        /// </summary>
        [TestMethod]
        public void TmdbExceptionConstructorTest1()
        {
            var innerException = new FileNotFoundException();
            var apiError = new TmdbStatusResponse();
            var target = new TmdbException( innerException, apiError );
            Assert.AreSame( innerException, target.InnerException );
            Assert.AreSame( apiError, target.ApiError );
        }
    }
}